<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    .container {
      margin: 200px;
    }
    .ball {
      --delay: 0s;
      width: 40px;
      height: 40px;
      background-color: red;
      border-radius: 50%;
      animation: move 1s var(--delay) linear forwards paused, eye 1s var(--delay) linear forwards paused;

    }
    @keyframes eye {
      0% {
        clip-path: polygon(0 70%, 100% 0, 100% 100%, 0 100%);
      }
      100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
      }
    }
    @keyframes move {
      100% {
        transform: translateX(200px);
      }
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="ball"></div>
    <input type="range" name="range" id="" min="0" max="1" step="0.01" value="0">
  </div>
  <script>
    const ball = document.querySelector('.ball');
    const input = document.querySelector('input');
    input.oninput = function() {
      console.log(`-${input.value}s`)
      ball.style.setProperty('--delay', `-${input.value}s`);
    }
  </script>
</body>
</html>
